const storageKey = 'userkey'
export default {
	namespaced: true,
	state() {
		return {
			token: uni.getStorageSync(storageKey) || ''
		}
	},
	mutations: {
		setToken(state, newToken) {
			uni.setStorageSync(storageKey, newToken)
			state.token = newToken
		},
		removeToken(state) {
			uni.setStorageSync(storageKey, '')
			state.token = ''
		}
	},
	getters: {}
}